package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("collect")
public class Collect {

    @TableId(type = IdType.AUTO)
    private Long id;
    private Long userId;
    private Integer poetryId;
    private Date createTime;

    public Collect(Long userId, Integer poetryId) {
        this.userId = userId;
        this.poetryId = poetryId;
    }
}
